package com.flyduck.mall.oms.admin.vo;

import com.flyduck.mall.oms.domain.OmsOrder;
import com.flyduck.mall.oms.domain.OmsOrderItem;
import com.flyduck.mall.oms.domain.OmsRefund;
import com.flyduck.mall.oms.api.constant.OrderConstant;
import lombok.Data;

import java.io.Serializable;
import java.util.List;

/**
 * <p>
 * AdminOrderDetailsRespVO
 * </p>
 *
 * @author flyduck
 * @since 2024-06-11
 */
@Data
public class AdminOrderDetailsRespVO extends OmsOrder implements Serializable {

    private List<OmsOrderItemVO> orderItems;
    private OmsRefundVO appRefund;

    private String username;
    private String userAvatar;

    //订单状态中文
    private String orderStatusStr;

    public String getOrderStatusStr() {
        return OrderConstant.OrderStatus.fromCode(getOrderStatus()).getDescription();
    }

    public static class OmsOrderItemVO extends OmsOrderItem implements Serializable{

    }

    public static class OmsRefundVO extends OmsRefund implements Serializable{

    }
}
